package com.example.music.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("singer")
public class Singer extends BaseEntity{
    @TableField("name")
    private String name;

    @TableField("sex")
    private int sex;

    @TableField("pic")
    private String pic;

    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("birth")
    private Date birth;

    @TableField("location")
    private String location;

    @TableField("introduction")
    private String introduction;
}
